/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.oa.action.humanresources;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.oa.mapper.humanresources.StationMapper;
public class StationAction extends BaseAction
{
    @Autowired(required=false)
	private StationMapper mapper;
    /**
    岗位列表
    */
    
    public Map staionAdmin() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        s_firm = s_firm.buildTree(tb,tb.getPid());
        result.put("s_firm", s_firm);
        
        return result;
    }
    /**
    */
    
    public Object s_role() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID1",-1);
        SQLList<SQLMap> s_role=mapper.s_role(params);
        result.put("s_role", s_role);
        
        return s_role;
    }
    /**
    */
    
    public Map s_outline() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_outline=mapper.s_outline(params);
        result.put("s_outline", s_outline);
        
        return result;
    }
    /**
    转移岗位人员
    */
    
    public Map staffStaionMove() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_role=mapper.s_role(params);
        result.put("s_role", s_role);
        
        return result;
    }
    /**
    岗位统计图
    */
    
    public Map cartogramStation() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        s_firm = s_firm.buildTree(tb,tb.getPid());
        result.put("s_firm", s_firm);
        
        return result;
    }
    /**
    岗位时间
    */
    
    public Map cartogram() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("tm_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> tm_firm=mapper.tm_firm(params);
        tm_firm = tm_firm.buildTree(tb,tb.getPid());
        result.put("tm_firm", tm_firm);
        
        return result;
    }
    /**
    */
    
    public Map cartogramList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID7","");
        params.def("CMID8","");
        SQLList<SQLMap> s_s=mapper.s_s(params);
        SQLMap s_s_emt=s_s.getExistfirst();
        result.put("s_s", s_s_emt);
        
        
        
        
        SQLList<SQLMap> s_person=mapper.s_person(params);
        result.put("s_person", s_person);
        
        
        SQLList<SQLMap> s_s_type=mapper.s_s_type(params);
        result.put("s_s_type", s_s_type);
        
        
        SQLList<SQLMap> s_worktime=mapper.s_worktime(params);
        result.put("s_worktime", s_worktime);
        
        return result;
    }
    /**
    基本信息
    */
    
    public Map stationDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        SQLMap s_firm_emt=s_firm.getExistfirst();
        result.put("s_firm", s_firm_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map stationUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_role=mapper.s_role(params);
        SQLMap s_role_emt=s_role.getExistfirst();
        result.put("s_role", s_role_emt);
        
        
        
        
        SQLList<SQLMap> s_list_station_type=mapper.s_list_station_type(params);
        result.put("s_list_station_type", s_list_station_type);
        
        
        SQLList<SQLMap> s_list_station_wages=mapper.s_list_station_wages(params);
        result.put("s_list_station_wages", s_list_station_wages);
        
        
        
        return result;
    }
    /**
    工作安排
    */
    
    public Map stationPlan() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_hour=mapper.s_hour(params);
        result.put("s_hour", s_hour);
        
        
        SQLList<SQLMap> s_minute=mapper.s_minute(params);
        result.put("s_minute", s_minute);
        
        
        SQLList<SQLMap> l_worktimeadd=mapper.l_worktimeadd(params);
        result.put("l_worktimeadd", l_worktimeadd);
        
        
        SQLList<SQLMap> s_worktime=mapper.s_worktime(params);
        result.put("s_worktime", s_worktime);
        
        
        SQLList<SQLMap> l_worktime=mapper.l_worktime(params,pagination);
        l_worktime.setPagedListInfo(pagination);
        result.put("l_worktime", l_worktime);
        
        return result;
    }
    /**
    设置工作日
    */
    
    public Map stationPlanTime() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_hour=mapper.s_hour(params);
        result.put("s_hour", s_hour);
        
        
        SQLList<SQLMap> s_minute=mapper.s_minute(params);
        result.put("s_minute", s_minute);
        
        
        
        return result;
    }
    /**
    设置加班时间
    */
    
    public Map workPlanTime() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_hour=mapper.s_hour(params);
        result.put("s_hour", s_hour);
        
        
        SQLList<SQLMap> s_minute=mapper.s_minute(params);
        result.put("s_minute", s_minute);
        
        return result;
    }
    /**
    角色授权
    */
    
    public Map roleAuthorize() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_menu_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        s_menu = s_menu.buildTree(tb,tb.getPid());
        result.put("s_menu", s_menu);
        
        return result;
    }
    /**
    修改授权
    */
    
    public Map roleUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_menu_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        s_menu = s_menu.buildTree(tb,tb.getPid());
        result.put("s_menu", s_menu);
        
        return result;
    }
    /**
    我的桌面
    */
    
    public Map myDesktopHuma() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        SQLMap s_menu_emt=s_menu.getExistfirst();
        result.put("s_menu", s_menu_emt);
        
        return result;
    }
    /**
    修改我的桌面
    */
    
    public Map modifyMyDesktopHuma() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_menu_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        s_menu = s_menu.buildTree(tb,tb.getPid());
        result.put("s_menu", s_menu);
        
        return result;
    }
    /**
    文件授权
    */
    
    public Map pubFileUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_menu_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_menu=mapper.s_menu(params);
        s_menu = s_menu.buildTree(tb,tb.getPid());
        result.put("s_menu", s_menu);
        
        return result;
    }
    /**
    权限视图
    */
    
    public Map powerView() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("pmslist_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> pmslist=mapper.pmslist(params);
        pmslist = pmslist.buildTree(tb,tb.getPid());
        result.put("pmslist", pmslist);
        
        return result;
    }
    /**
    职责要求
    */
    
    public Map postDuty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        return result;
    }
    /**
    任职要求
    */
    
    public Map postOffice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_jobduty=mapper.s_jobduty(params);
        result.put("s_jobduty", s_jobduty);
        
        return result;
    }
    /**
    考核要求
    */
    
    public Map postAppraise() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_check=mapper.s_check(params);
        result.put("s_check", s_check);
        
        return result;
    }
    /**
    面试问题
    */
    
    public Map interview() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_audition=mapper.s_audition(params);
        result.put("s_audition", s_audition);
        
        return result;
    }
    /**
    增加新岗位
    */
    
    public Map stationAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_list_station_type=mapper.s_list_station_type(params);
        result.put("s_list_station_type", s_list_station_type);
        
        
        SQLList<SQLMap> s_list_station_wages=mapper.s_list_station_wages(params);
        result.put("s_list_station_wages", s_list_station_wages);
        
        
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        SQLMap s_firm_emt=s_firm.getExistfirst();
        result.put("s_firm", s_firm_emt);
        
        return result;
    }
    /**
    选择职责要求
    */
    
    public Map dutyChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_duty=mapper.p_duty(params,pagination);
        p_duty.setPagedListInfo(pagination);
        result.put("p_duty", p_duty);
        
        return result;
    }
    /**
    修改职责要求
    */
    
    public Map dutyUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_duty=mapper.t_duty(params);
        SQLMap t_duty_emt=t_duty.getExistfirst();
        result.put("t_duty", t_duty_emt);
        
        return result;
    }
    /**
    选择任职要求
    */
    
    public Map officeChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_jobduty=mapper.p_jobduty(params,pagination);
        p_jobduty.setPagedListInfo(pagination);
        result.put("p_jobduty", p_jobduty);
        
        return result;
    }
    /**
    修改任职要求
    */
    
    public Map officeUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_jobduty=mapper.t_jobduty(params);
        SQLMap t_jobduty_emt=t_jobduty.getExistfirst();
        result.put("t_jobduty", t_jobduty_emt);
        
        return result;
    }
    /**
    选择考核要求
    */
    
    public Map appraiseChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_check=mapper.p_check(params,pagination);
        p_check.setPagedListInfo(pagination);
        result.put("p_check", p_check);
        
        return result;
    }
    /**
    修改考核要求
    */
    
    public Map appraiseUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_check=mapper.t_check(params);
        SQLMap t_check_emt=t_check.getExistfirst();
        result.put("t_check", t_check_emt);
        
        return result;
    }
    /**
    选择问题分类
    */
    
    public Map interviewChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_audition=mapper.p_audition(params,pagination);
        p_audition.setPagedListInfo(pagination);
        result.put("p_audition", p_audition);
        
        return result;
    }
    /**
    修改问题分类
    */
    
    public Map interviewUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_audition=mapper.t_audition(params);
        SQLMap t_audition_emt=t_audition.getExistfirst();
        result.put("t_audition", t_audition_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_role() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_role(params);
        
        return result;
    }
    /**
    转移岗位人员修改
    */
    
    public Map staffStaionMoveSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_access = mapper.u_access(params);
        result.put("u_access", u_access);
        
        return result;
    }
    /**
    */
    
    public Map cartogramPage() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        return cartogramList();
    }
    /**
    */
    
    public Map d_worktime() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_worktime(params);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map stationUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_role = mapper.u_role(params);
        result.put("u_role", u_role);
        
        return result;
    }
    /**
    */
    
    public Map d_worktimeadd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_worktimeadd(params);
        
        return result;
    }
    /**
    设置工作日修改
    */
    
    public Map stationPlanTimeSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("v_start_hour", SQL.setTime(null,getParameter("startHour"),getParameter("startMinute"),null));
        
        
        result.put("v_end_hour", SQL.setTime(null,getParameter("endHour"),getParameter("endMinute"),null));
        
        
        params.def("startHour",-1);
        params.def("endHour",-1);
        int id = mapper.id(params);
        result.put("id", id);
        
        return result;
    }
    /**
    设置加班时间修改
    */
    
    public Map workPlanTimeSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("startHour",-1);
        params.def("endHour",-1);
        params.def("work_day",null);
        params.put("v_start_hour",SQL.setTime(null,getParameter("startHour"),getParameter("startMinute"),null));
        params.put("v_end_hour",SQL.setTime(null,getParameter("endHour"),getParameter("endMinute"),null));
        int id = mapper.id(params);
        result.put("id", id);
        
        return result;
    }
    /**
    修改授权修改
    */
    
    public Map roleUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.put("elements",hqlBean.getElements().values());
        mapper.roleUpSubmit(params);
        
        return result;
    }
    /**
    修改我的桌面修改
    */
    
    public Map modifyMyDesktopHumaSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.modifyMyDesktopHumaSubmit(params);
        
        
        int i_desk = mapper.i_desk(params);
        result.put("i_desk", i_desk);
        
        return result;
    }
    /**
    文件授权修改
    */
    
    public Map pubFileUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.put("elements",hqlBean.getElements().values());
        mapper.pubFileUpSubmit(params);
        
        return result;
    }
    /**
    权限视图修改
    */
    
    public Map powerViewSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.put("elements",hqlBean.getElements().values());
        mapper.powerViewSubmit(params);
        
        return result;
    }
    /**
    */
    
    public Map d_duty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_duty(params);
        
        return result;
    }
    /**
    */
    
    public Map d_jobduty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_jobduty(params);
        
        return result;
    }
    /**
    */
    
    public Map d_check() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_check(params);
        
        return result;
    }
    /**
    */
    
    public Map d_audition() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_audition(params);
        
        return result;
    }
    /**
    增加新岗位修改
    */
    
    public Map stationAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID = mapper.CMID(params);
        result.put("CMID", CMID);
        
        return result;
    }
    /**
    选择职责要求修改
    */
    
    public Map dutyChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        for (SQLMap emt:hqlBean.getTableElements("station_duty")){
            params=new SQLParam(request,emt.getMap());
            mapper.bi_duty(params);
        }
        
        return result;
    }
    /**
    修改职责要求修改
    */
    
    public Map dutyUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    选择任职要求修改
    */
    
    public Map officeChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("station_jobduty")){
            params=new SQLParam(request,emt.getMap());
            mapper.bi_jobduty(params);
        }
        
        return result;
    }
    /**
    修改任职要求修改
    */
    
    public Map officeUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    选择考核要求修改
    */
    
    public Map appraiseChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("station_check")){
            params=new SQLParam(request,emt.getMap());
            mapper.bi_jobduty(params);
        }
        
        return result;
    }
    /**
    修改考核要求修改
    */
    
    public Map appraiseUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    选择问题分类修改
    */
    
    public Map interviewChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("station_audition")){
            params=new SQLParam(request,emt.getMap());
            mapper.bi_jobduty(params);
        }
        
        return result;
    }
    /**
    修改问题分类修改
    */
    
    public Map interviewUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
}